var divObj;
//文档加载完成触发
window.onload = function () {
    divObj = document.getElementById("FaceId");
    var imgArray = divObj.getElementsByTagName("img")
    for (var i = 0; i < imgArray.length; i++) {
        imgArray[i].onclick=function (){
            changeImg(this)
        }
    }
}

function showFace() {
    if (divObj.style.display == "block") {
        divObj.style.display = "none";
    } else {
        divObj.style.display = "block";
    }
}

function changeImg(img) {
    document.getElementById("Face").src = img.src;
    showFace();
}